<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
      <base target="_self"/>
    <title>创建公司信息</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<link rel="stylesheet" href="<%=path%>/css/main_css.css" type="text/css"></link>
		<script type="text/javascript" src="<%=path%>/javaScript/menu.js"></script>
        <script type="text/javascript" src="<%=path%>/javaScript/fckeditor/fckeditor.js"></script>       
     <script type="text/javascript">
        function winclose(){
          window.close();
          window.opener.location.reload();
        }
  		mpmenu0=new mMenu('','winclose()','script','<%=path %>/images/close.gif','62','24','0','100','2');
  	    window.onload=function(){
	       var sBasePath = "<%=path%>/javaScript/fckeditor/";
		   var oFCKeditor = new FCKeditor( 'hyxw.content' );
		   oFCKeditor.Height =400;
		   oFCKeditor.BasePath	= sBasePath ;
		   oFCKeditor.ReplaceTextarea() ;
		  
	   }
	    function doSubmit(){
	      if(!check()){
		   return;  
		 }
		document.getElementById("frm1").action="<%=path%>/hyxw/saveHyxw.do";
		 document.getElementById("frm1").submit();
		 //winclose();
	   }
	   function formReset(){
	     document.getElementById("frm1").reset();
	   }
	   function check(){
	      var title = document.getElementById("title");
	     // var content = document.getElementsByName("hyxw.content")[0];
	      if(title.value=="" || title.value==null){
	         alert("标题内容不能为空！")
	         title.focus();	         
	         return false;
	      }//else if(content.value=="" || content.value==null){
	         //alert("新闻内容不能为空！")
	         //content.focus();
	        // return false;	         
	      //}   
	      return true; 
	   }	   
	</script>
  </head>
  
  <body>
		<form action="saveHyxw.do" name="frm" method="post" enctype="multipart/form-data" id="frm1">
			<input type="hidden" name="actionId" value="010301" id="actionId" />

			<table cellspacing="0" cellpadding="0" class="main_tab1">
				<tr>
					<td class="main_tab1_td1">
						<img src="<%=path%>/images/img_main_tab1_td1.gif" alt="left" />
					</td>
					<td class="main_tab1_td2">
						<div id="location">
							行业新闻
						</div>
						<div id="funbut">
							<SCRIPT>document.write(mwritetodocument());</SCRIPT>
						</div>
					</td>
					<td class="main_tab1_td1">
						<img src="<%=path%>/images/img_main_tab1_td3.gif" alt="right" />
					</td>
				</tr>
				<tr>
					<td colspan="3" class="main_tab1_td3">
						<div id="mainbg">

							<div class="jiange10"></div>
							<table width="100%" border="0" cellspacing="0" cellpadding="0"
								class="main_tab2">
							</table>

							<div style="height: 80%; width: 100%; overflow: auto;">
								<table width="100%" border="1" cellspacing="0" id="theObjTable"
									cellpadding="2" class="main_tab2">
									<tr>
									   <th width="16%">新闻标题<font color="red">*</font></th>
									   <td colspan="3"><input id="title" name="hyxw.title"></td>								
									</tr>
									<tr style="height:400px">
									   <th width="16%">新闻内容<font color="red">*</font></th>
									   <td colspan="3">
									      <textarea id="content1" name="hyxw.content" rows="200" cols="80" style="width: 100%; height: 100%"></textarea>
						                </td>
									</tr>
									<tr>
									   <th width="16%">新闻图片<font color="red">*</font></th>
									   <td colspan="3"><table><s:file name="file"/></table></td>								
									</tr>
								</table>									
							</div>
							<div class="butk">
								<div class="btn_01">
								<a href="#" onclick="doSubmit()">保&nbsp;存</a>
								</div>
								<div class="btn_01">
								<a href="#" onclick="formReset()">清&nbsp;除</a>
								</div>
							</div>
						</div>
					</td>
				</tr>
				<tr>
					<td class="main_tab1_td4">
						<img src="<%=path%>/images/img_ht_wz_65.gif" alt="left" />
					</td>
					<td class="main_tab1_td5"></td>
					<td class="main_tab1_td4">
						<img src="<%=path%>/images/img_ht_wz_67.gif" alt="right" />
					</td>
				</tr>
			</table>
		</form>
	</body>
</html>